
#pragma once

#include "WeInput.h"
#include "laser.h"
#include "sprite.h"
#include "WeVector2.h"

namespace WackiEngine
{

	class SpaceShip
	{
	public:
		SpaceShip();

		void setupInput();


		void update();
		void render();
		void onKey(const KeyEvent& e);

		void onMoveUp(float value, uint32 deviceId);
		void onMoveRight(float value, uint32 deviceId);
		void onLookUp(float value, uint32 deviceId);
		void onLookRight(float value, uint32 deviceId);
		void onShootStart(uint32 deviceId);
		void onShootStop(uint32 deviceId);
		void shoot();

	protected:
		float		_maxVel;

		Vector2f	_acc;
		Vector2f	_vel;
		Vector2f	_pos;
		Vector2f	_dir;

		bool		_shooting;

		Sprite		_ship;
		Laser		_lasers[50];
		int32		_laserIndex;
	};

}